import { request } from "../../utils/request";

export const list=(data: API.Class.List)=>request.post<PageResult<UI.List>>('/class/list',data)
export const add =(data:API.Class.Add)=>request.post<number>("/class/add", data);
export const category=(category:number)=>request.get<UI.Staff[]>(`/staff/listbycategory/${category}`)
export const valid=(data:API.Class.Valid)=>request.post<number>('/class/valid_name',data)
export const update=(data:API.Class.Update)=>request.post<null>("/class/update", data)
export const begin=(data:API.Class.Begin)=>request.post<string>("/class/begin", data)
export const end=(data:API.Class.End)=>request.post<string>("/class/end", data)
export const get=()=>request.get<UI.Class[]>("/class/all")